package org.jeecg.modules.basedata.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.entity.basedata.BaseProject;
import org.jeecg.entity.basedata.BaseProjectInfo;
import org.jeecg.modules.system.model.SysDepartTreeModel;
import org.jeecg.modules.system.model.TreeSelectModel;
import org.jeecg.vo.basedata.BaseProjectPage;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 项目
 * @Author: jeecg-boot
 * @Date:   2019-06-18
 * @Version: V1.0
 */
public interface IBaseProjectService extends IService<BaseProject> {

	/**
	 * 查询项目信息,并分节点进行显示
	 * @return
	 */
	public List<SysDepartTreeModel> queryProjectTreeList();
	public List<SysDepartTreeModel> queryProjectTreeLists();

	public List<SysDepartTreeModel> queryProjectTreeListOne();

	public BaseProjectPage selectByMainId(String mainId);
	/**
	 * 添加一对多
	 *
	 */
	public void saveMain(BaseProject baseProject, BaseProjectInfo baseProjectInfo) ;

	/**
	 * 修改一对多
	 *
	 */
	public void updateMain(BaseProject baseProject, BaseProjectInfo baseProjectInfo);

	/**
	 * 删除一对多
	 */
	public void delMain(String id);

	/**
	 * 批量删除一对多
	 */
	public void delBatchMain(Collection<? extends Serializable> idList);

    List<BaseProject> findProjectList(String userId);

    BaseProject getProjectById(String projectId);

    BaseProject getProjectByName(String projectName);

	/**
	 * 分页+模糊查询
	 * @param page
	 * @param baseProject
	 * @return
	 */
	public Page<BaseProject> listByParams(Page<BaseProject> page,BaseProject baseProject);

	List<BaseProject> findProjectAll();

	public Integer getFloorCount(String id);

	public Integer getFloorCounts(String[] ids);

    List<SysDepartTreeModel> queryProjectTreeByKeywords(String keyWord,List<String> projectIds);

    List<SysDepartTreeModel> queryOfficeTreeByKeywords(String keyWord, List<String> officeIds);

	List<SysDepartTreeModel> getByProjectIds(BaseProject baseProject);

//    String queryProjectName(String projectId);

	List<TreeSelectModel> getByFloorTreeList(String projectId);

	public List<SysDepartTreeModel> queryTenantList(String floorId);//租户树结构数据

	public Integer queryTenantListCount(String floorId);

	public List<SysDepartTreeModel> queryCustomerList(String floorId);//业主树结构数据

    public Integer queryCustomerListCount(String floorId);

	public List<SysDepartTreeModel> queryOutCustomer(String floorId);//迁出业主树结构数据

}
